package main

import "fmt"

var name1 string = "老王"
var name2 = "老张"

var num1, num2, num3 int32 = 10, 20, 30

//不能：
//name3 := "老唐"

const aa string = "jay"
const bb = 100

const age1, age2, age3 int32 = 10, 11, 12
const name4, weight2 = "Jerry", 130

func main() {
	fmt.Println(name1, name2)
	fmt.Println(num1, num2, num3)
	//声明了一定要用
	name3 := "老唐"
	fmt.Println(name3)

	fmt.Println(aa, bb)
	fmt.Println(name4, weight2)
	fmt.Println(age1, age2, age3)

	fmt.Print("输出到控制台不换行")
	fmt.Println("---")
	fmt.Println("输出到控制台并换行")
	fmt.Printf("name=%s,age=%d\n", "Tom", 30)
	fmt.Printf("name=%s,age=%d,height=%v\n", "Tom", 30, fmt.Sprintf("%.2f", 180.567))
}
